package com.hongdee.crm.taskConfig.dao.impl;

import com.hongdee.base.basedao.impl.BaseDaoImpl;
import com.hongdee.crm.taskConfig.dao.ITCrmCarTaskConfDao;
import com.hongdee.crm.taskConfig.entity.TCrmCarTaskConf;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by My on 2017/5/16.
 */
@Component
public class TCrmCarTaskConfDaoImpl extends BaseDaoImpl implements ITCrmCarTaskConfDao {

    @Override
    public TCrmCarTaskConf getCrmCarConfById(String id, String companyId) throws Exception {
        String sql="from TCrmCarTaskConf where id=:id and companyId=:companyId";
        Map<String,Object> params=new HashMap<>();
        params.put("id",id);
        params.put("companyId",companyId);
        return (TCrmCarTaskConf) this.getHibernateDao().findEntityByHqlWithParams(sql,params);
    }

}


